﻿(function () {
'use strict';
SpaDemo.controller('homepageCtrl', ['$scope', '$http', '$window', 'announcementsDataContext',
    function homepageCtrl($scope, $http, $window, announcementsDataContext) {

        var vm = this;
        vm.listItems = [];
        vm.viewTitle = "Announcements";
        announcementsDataContext.getData().then(function(data) {
            vm.listItems = data;
            console.table(vm.listItems);
        });
        //add error handler 
    }
]);
})();